'use strict';
module.exports = (sequelize, DataTypes) => {
  const carManager = sequelize.define('carmanagers', {
    id: {
      allowNull: false,
      autoIncrement: true,
      primaryKey: true,
      type: DataTypes.INTEGER
    },
    name: {
      type:  DataTypes.STRING(30),
      allowNull: false
    },
    position: {
      allowNull: false,
      type:  DataTypes.STRING(100)
    },
    age: {
      allowNull: false,
      type: DataTypes.INTEGER(4)
    },
    iphone:{
      type: DataTypes.STRING(16)
    },
    identity:{
      type: DataTypes.STRING(20)
    },
    createdAt: {
      allowNull: false,
      type:  DataTypes.DATE
    },
    updatedAt: {
      allowNull: false,
      type:  DataTypes.DATE
    }
  }, {
    tableName: 'carmanagers',
    charset: 'utf8mb4',
    collate: 'utf8mb4_bin'
  });
  carManager.associate = function(models) {
    // associations can be defined here
  };
  return carManager;
};